[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Determines if the collection contains a particular item. This default implementation
iterates all of the items in the collection via GetEnumerator, testing each item
against item using IComparable<T>.Equals or
Object.Equals.
Namespace: Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
C# |
---|
public virtual bool Contains( T item ) |
Visual Basic (Declaration) |
---|
Public Overridable Function Contains ( _ item As T _ ) As Boolean |
Visual C++ |
---|
public: virtual bool Contains ( T item ) |
Parameters
- item
- T
The item to check for in the collection.
Return Value
True if the collection contains item, false otherwise.Remarks
You should strongly consider overriding this method to provide
a more efficient implementation, or if the default equality comparison
is inappropriate.
See Also
CollectionBase<(Of <T>)> Class
Wintellect.PowerCollections Namespace